#ifndef _SCREEN_h
#define _SCREEN_h

#include "globalvar.h"
#include "string.h"

#if (0==TFT_DISPLAY_DIR || 1==TFT_DISPLAY_DIR)
#define LINE_HEIGHT_OFFSET 5 // �и�ƫ����
#define SCREEN_HEIGHT_OFFSET 0 // ��Ļ�߶�ƫ����
     
#elif (2==TFT_DISPLAY_DIR || 3==TFT_DISPLAY_DIR)
#define LINE_HEIGHT_OFFSET 2 // �и�ƫ����
#define SCREEN_HEIGHT_OFFSET 3 // ��Ļ�߶�ƫ����
     
#endif

#define tft180_write_8bit_data(data) spi_write_8bit(TFT180_SPI, data)
#define tft180_write_16bit_data(data) spi_write_16bit(TFT180_SPI, data)

#define None 0
#define MENU 1
#define CAMERA 2

// typedef enum
// {
//     NONE,
//     MENU,
//     CAMERA
// } display_mode_t;

extern int display_mode;

// void tft180_set_region(unsigned int x_start, unsigned int y_start, unsigned int x_end, unsigned int y_end);
// void tft180_write_8bit_data(uint8 dat);
// void tft180_write_16bit_data(uint16 dat);

void lcd_show_6x8_char(uint16 x, uint16 y, const char dat, bool reverse, bool underline);
void lcd_show_6x8_str(uint16 x, uint16 y, const char dat[], bool reverse, bool underline);
void lcd_show_6x8_str_left(uint16 y, uint16 offset, const char dat[], bool reverse, bool underline);
void lcd_show_6x8_str_right(uint16 y, uint16 offset, const char dat[], bool reverse, bool underline);
void lcd_show_6x8_str_center(uint16 y, uint16 offset, const char dat[], bool reverse, bool underline);
void display_mode_switch();
void screen_display();



#endif
